<?php
namespace app\service;

use app\service\message\receive\normal\Text;



/**
 * @method static Text message.receive.normal.text($message=[])
  */
class Factory {
    public static function __callStatic($name, $arguments)
    {
        $class = '\\app\\service\\'.str_replace('.', '\\', $name);
        $param = $arguments[0];
        $event = null;
        if(!class_exists($class)) {
            $event = new DefaultHandle($param);
        }else{
            $event = new $class($param);
        }
        if($event instanceof Base) {
            return $event;
        }
    }
}